package com.screwdriver.jso.processor.generator;

import com.screwdriver.jso.processor.utils.TypeResolver;

/**
 * Created by IntelliJ IDEA.
 * User: jan kowalski
 * Date: 27.08.11
 * Time: 20:54
 * To change this template use File | Settings | File Templates.
 */
public class JsoConvertionGenerator extends ReferenceGenerator {

    public String setter(String fromVariableName, TypeResolver propertyType) {
        return String.format("(%s)", fromVariableName);
    }


    public String getter(String fromVariableName, TypeResolver propertyType) {
        return String.format("(%1$s!=null ? %1$s: null)", fromVariableName);
    }


}
